How to make an a poisening pistol gun
1.Watch the video. 2. Lets get started. 3.ok so what u need to do is insert a brick. 4. In that brick put a special mesh. 5. In the mesh look at mesh id in mesh id insert this link (7ff2735b442790a1b6fe9d416656349e) 6. In ur backpack insert a tool and in that tool put the brick with the mesh inside it not the tool in the brick the brick in the tool. 7. In the brick insert a sound and call it fire. 8. Now in the sound look for something called sound id and in the sound id insert this id (e004cac52c50c98762ee112ad143d242). 9. Now make sure its not looped. 10. Add another sound in the same brick and call it reload. 11. In reload look for sound id and in it put this (http://www.roblox.com/asset/?id=2697432) 12. Make sure its not looped as well. 13. Call the brick Handle. 14. Now in the tool insert a script call it brick clean up, in the script insert this code 15. The code for brick clean up ▼(as follows)▼. -- this script removes its Parent's parent from the workspace after 24 seconds wait(1) script.Parent.Parent = nil --This is the easiest script in the entire game of Roblox 16. Insert another script in the tool and call it paintball. 17. In the paintball script add this code ▼(as follows)▼. ball = script.Parent damage = 7 function Poison(character, attacker) if (character:FindFirstChild("ForceField") ~= nil) then return end if (character:FindFirstChild("Poison") nil ) then local s = script.Parent.Poison:clone() s.Disabled = false s.Parent = character end end function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") ----change humanoid to zombie if u want it to kill only zombies -- make a splat for i=1,3 do local s = Instance.new("Part") s.Shape = 1 -- block s.formFactor = 2 -- plate s.Size = Vector3.new(0,0,0) s.BrickColor = ball.BrickColor local v = Vector3.new(math.random(-1,1), math.random(0,1), math.random(-1,1)) s.Velocity = 25 * v s.CFrame = CFrame.new(ball.Position + v, v) ball.BrickCleanup:clone().Parent = s s.BrickCleanup.Disabled = false s.Parent = game.Workspace end if humanoid ~= nil then Poison(humanoid.Parent, attacker) tagHumanoid(humanoid) humanoid.Health = humanoid.Health - damage wait(2) untagHumanoid(humanoid) end connection:disconnect() ball.Parent = nil end function tagHumanoid(humanoid) -- todo: make tag expire local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) wait(2) ball.Parent = nil --Made by Alagor and Trenex 18. In the tool insert another script and call it PaintBallShooter. 19. In the paintballshooter script insert this code ▼(as follows)▼. Tool = script.Parent colors = {37,} function fire(v) Tool.Handle.Fire:play() local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local missile = Instance.new("Part") local spawnPos = vCharacter.PrimaryPart.Position spawnPos = spawnPos + (v * 8) missile.Position = spawnPos missile.Size = Vector3.new(1,1,1) missile.Velocity = v * 500 missile.BrickColor = BrickColor.new(colors#colors)) missile.Shape = 0 missile.BottomSurface = 0 missile.TopSurface = 0 missile.Name = "Paintball" missile.Elasticity = 0 missile.Reflectance = .1 missile.Friction = .3 local force = Instance.new("BodyForce") force.force = Vector3.new(0,200,0) force.Parent = missile Tool.BrickCleanup:clone().Parent = missile local new_script = script.Parent.Paintball:clone() new_script.Disabled = false new_script.Parent = missile local poisonsc = script.Parent.Poison:clone() poisonsc.Parent = missile local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vPlayer creator_tag.Name = "creator" creator_tag.Parent = missile missile.Parent = game.Workspace end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid nil then print("Humanoid not found") return end local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit fire(lookAt) wait(.3) Tool.Enabled = true end script.Parent.Activated:connect(onActivated) --Made by Alagor and Trenex 20. In the tool insert another script and call it poison. 21. In the poison script insert this code ▼(as follows)▼. function Poison() local character = script.Parent local humanoid = character:FindFirstChild("Humanoid") if (character:FindFirstChild("ForceField") ~= nil) then return end local childs = character:GetChildren() local colors = {} for i=1,#childs do if (childsi.className "Part") then colorsi = childsi.BrickColor childsi.BrickColor = BrickColor.new(119) end end wait(1) for i=1,#childs do if (childsi.className "Part") then childsi.BrickColor = colorsi end end --tagHumanoid(humanoid, attacker) humanoid:TakeDamage(14)wait(0.5) --untagHumanoid(humanoid) end for i=1,10 do Poison() wait(.3) end script.Parent = nil --Made by Alagor and Trenex 22. In the tool insert another script and call it "weld script". 23. In the weld script insert this code ▼(as follows)▼. -- Table of contents WCR - Weld Creation WPR - Weld Parents WP0 - Weld Part 0 WP1 - Weld Part 1 WC1 - Weld C1 -- bin = script.Parent function weld() -- -- -- Weld Creation(WCR) -- -- -- local w1 = Instance.new("Weld") local w2 = Instance.new("Weld") local w3 = Instance.new("Weld") local w4 = Instance.new("Weld") -- -- -- Weld Parents(WPR) -- -- -- w1.Parent = bin.Handle w2.Parent = bin.Handle w3.Parent = bin.Handle w4.Parent = bin.Handle -- -- -- Weld Part0(WP0) -- -- -- w1.Part0 = w1.Parent w2.Part0 = w2.Parent w3.Part0 = w3.Parent w4.Part0 = w4.Parent -- -- -- Weld Part1(WP1) -- -- -- w1.Part1 = bin.Bunt w2.Part1 = bin.BarrelHold w3.Part1 = bin.Barrel w4.Part1 = bin.Sight -- -- -- =Weld C1(WC1) =-- -- --w1.C1 = CFrame.fromEulerAnglesXYZ(-0.4, 0, 0) * CFrame.new(0, 0.2, -1) w2.C1 = CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0) * CFrame.new(0, 0, 2) w3.C1 = CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0) * CFrame.new(0, 0, 2.2) w4.C1 = CFrame.fromEulerAnglesXYZ(0, math.pi/2, math.pi) * CFrame.new(0, -0.3, 1) end bin.Equipped:connect(weld) bin.Unequipped:connect(weld) --Made by Alagor and Trenex 24. In the tool insert a local GUI. 25. In the local gui insert this code ▼(as follows)▼. local Tool = script.Parent; enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" wait(.3) mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true end function onEquippedLocal(mouse) if mouse nil then print("Mouse not found") return end mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end Tool.Equipped:connect(onEquippedLocal) --Made by Alagor and Trenex 26. Thats it then a just the grips to make it looks like your character is holding the weapon. 27. Save to roblox call it the "serpent sting pistol". 28. Enjoy. You have finished. --Made by Alagor and Trenex